
public class ComputeThread {
	private ComputeCash cash;
	private int n;
	ComputeThread(int n, ComputeCash cash) {
		this.cash = cash;
		this.n = n;
	}
	ComputeCash computeThread() {
		SimpleArray arr = new SimpleArray();
		int[] mas = arr.getSimpleArray(n);
		for (int i = 0; i < mas.length; i++) {
			if (mas[i] != 0)
				cash.compute(mas[i], n);
		}
		return cash;
	}
}
